perm filename PART2[DOC,BGB] blob
sn#094577 filedate 1974-04-04 generic text, type C, neo UTF8
COMMENT ⊗ VALID 00014 PAGES
C REC PAGE DESCRIPTION
C00001 00001
C00003 00002
C00005 00003 1.0 INTRODUCTION TO GEOMES AND GEOMEL.
C00010 00004 DATUM AND LINK ACCESSING.
C00041 00005 3.0 WINGED EDGE PRIMITIVES.
C00043 00006 4.0 EULER MAKE PRIMITIVES.
C00045 00007 5.0 EULER KILL PRIMITIVES.
C00046 00008 6.0 EASY POLYHEDRON ROUTINES.
C00047 00009 7.0 EUCLIDEAN TRANSFORMATIONS.
C00050 00010 8.0 GEOMETRIC MEASURE ROUTINES.
C00051 00011 9.0 BODY INTERSECTION AND CUTTING.
C00052 00012 10.0 IMAGE FORMATION ROUTINES.
C00053 00013 11.0 INPUT/OUTPUT ROUTINES.
C00054 00014 12.0 AUXILLARY ROUTINES: III DISPLAY AND ARITHMETIC.
C00058 ENDMK
C⊗;
PART II - GEOMED AS A SAIL OR LISP ACCESSIBLE GRAPHICS COMMAND LANGUAGE.
1.0 Introduction to GEOMES and GEOMEL.
2.0 Memory, Control, Input and Output Routines.
GEOMED MKUNIV MKNODE KLNODE
MKWORLD MKCAMERA MKWINDOW
OUTB3D OUTGEM OUTCAM OUTVID
INB3D INGEM INCAM INCRE
3.0 Datum and Link Names:
XWC YWC ZWC AA BB CC XPP YPP ZPP
IX IY IZ JX JY JZ KX KY KZ
NFACE PFACE NED PED NVT PVT DAD SON BRO SIS
ALT ALT2 CW CCW CAR8 CDR8
4.0 Winged Edged Primitives:
MKB MKF MKE MKV MKFRAME
WING INVERT EVERT
ECW ECCW OTHER VCW VCCW FCW FCCW
BDET BATT BGET
5.0 Euler Routines:
MKBFV MKEV ESPLIT MKFE GLUEE
KLBFEV KLFE KLEV UNGLUE
GLUE MKCOPY SWEEP ROTCOM PYRAMID FVDUAL
MKCUBE MKCYLN MKBALL
BIN BUN BSUB MKCVEX
MKBUCK ECUT FCUT BCUT
6.0 Euclidean Routines:
TRANSL ROTATE SHRINK APTRAN INTRAN DISTANCE
NORM MKROT1 ORTHO1 ORTHO2 DETERM ANGL3V
7.0 Image Forming Routines:
GEODPY IIIDPY SHOW1 SHOW2 SHOW3 SHOW4
TAKE1 TAKE2 OCCULT SHADOW CLIPER
VPROJ UNPROJ FACOEF ECOEF
8.0 Arithmetic and Display Routines:
PI SQRT LOG SIN COS ATAN ATAN2 ASIN ACOS
DPYBUF DPYSST DPYSET DPYBIG DPYBRT
AVECT AIVECT RVECT RIVECT DPYOUT
1.0 INTRODUCTION TO GEOMES AND GEOMEL.
GEOMED is implemented in PDP-10 machine code and is composed
of geometric modeling subroutines. These subroutines are SAIL and
LISP accessible depending on how they are assembled and loaded. When
assembled and load for SAIL, the GEOMED subroutines are called GEOMES
for "Geometric Modeling Embedded in SAIL"; similarly when the
routines are assembled and loaded for LISP, they are referred to as
GEOMEL standing for "Geometric Modeling Embedded in LISP".
Strictly defined, I would have preferred to use the name
"GEOMED" only for the editor itself and to call the larger project
"GEM" for Geometric Modeling; however this has not caught on, and
so the reader is warned that there are two objects named "GEOMED",
one being the interactive drawing program by that name, the other
being the larger geometric modeling project including GEOMEL, GEOMES,
the data structure, the language, and so on.
As a graphics language, GEOMED is all semantics with no
syntax of its own. There are about one hundred subroutine which take
from one to four arguments, return one or no values, and usually have
considerible side effects on the GEOMED data structure.
Unless otherwise noted, all arguments and values are
integers; subroutines executed for effect return integer value zero.
DATUM AND LINK ACCESSING.
The GEOMED data structure is implemented as twelve word
blocks containing pointers and data in the fashion usual to graphics
and simulation; an introduction to this technology can be found in
Knuth. The twelve word blocks are called "nodes". Nodes
are referred to by their actual machine address in the user core
image, which is an integer called a "link". Subroutines that
take nodes as arguments or return nodes as values pass links rather
than the nodes themselves. In SAIL, the user core image can be
accessed as a special array named MEMORY.
3.0 WINGED EDGE PRIMITIVES.
3.1 MKB,MKF,MKE,MKV,MKFRAME. Make BFEV Nodes.
3.2 WING,INVERT,EVERT Make and change wing pointers.
3.3 LINKED Find if two entities are linked.
3.4 ECW,ECCW, Edge fetching around FV perimeter.
3.5 OTHER,VCW,VCCW,FCW,FCCW Face-vertex fetching from an edge.
3.6 BDET,BATT,BGET Body parts linking and body get.
INVERT(EDGE);
An edge is a directed vector with a positive and a negative
vertex; INVERT flip the orientation of an edge vector and returns the
same edge.
EVERT(BODY);
Evert turns a body inside out, or vice versa. A GEM
polyhedral surface has an inside and an outside; the inside is
defined by the orientation of the four wing pointers in edge nodes;
the evert primitives changes the order of these pointers in all the
edges of the given body.
4.0 EULER MAKE PRIMITIVES.
4.1 BNEW ← MKBFV; Make vertex polyhedron.
4.2 VNEW ← MKEV(F,V); MAKES NEW EDGE AND VERTEX SUCH THAT:
VNEW = NVT(ENEW); V = PVT(ENEW);
VNEW ← ESPLIT(E); MAKES NEW EDGE AND VERTEX...
4.3 ENEW ← MKFE(V1,F,V2); MAKES NEW FACE AND EDGE SUCH THAT:
FNEW = NFACE(ENEW); F = PFACE(ENEW);
V1 = PVT(ENEW); V2 = NVT(ENEW).
4.4 ENEW ← GLUEE(F1,V1,F2,V2); MAKES NEW EDGE, KILLS F2,
AND MAKES A HOLE OR KILLS A BODY.
V1 = PVT(ENEW); V2 = NVT(ENEW).
4.2 VNEW ← MKEV(FACE,VERTEX);
VNEW ← ESPLIT(EDGE);
Make a new edge and a new vertex in the given FACE from the
given VERTEX; the new vertex is return, VNEW; the new edge can be
accessed by taking PED(VNEW).
ESPLIT, makes a new edge and a new vertex, VNEW; the new edge may be
obtained by taking PED(VNEW); the new edge is place between VNEW and
PVT(EDGE).
4.3 ENEW ← MKFE(V1,FACE,V2);
Make a new face and a new edge by joining V1 and V2 of FACE.
The new edge is returned, ENEW; the new face may always be obtained
by taking NFACE(ENEW).
5.0 EULER KILL PRIMITIVES.
5.1 QNEW ← KLBFEV(Q); Kill entity.
5.2 F ← KLFE(E); Kill E and NFACE(E), return PFACE(E).
5.3 E ← KLEV(V); Kill V and PED(V), return other E of V.
V ← KLEV(E); Kill E and NVT(E), retirn PVT(E).
5.4 FNEW ← UNGLUE(E); Undo an GLUEE.
6.0 EASY POLYHEDRON ROUTINES.
6.1 BODY ← GLUE(FACE1,FACE2); Glue face-face.
6.2 QNEW ← MKCOPY(ENTITY); Make copy.
6.3 FACE ← SWEEP(FACE,FLAG); Sweep cylinder.
6.4 FACE ← ROTCOM(FACE); Rotation completion.
6.5 PEAK ← PYRAMID(FV); Make pyramid on a face (or vertex).
6.6 BODY ← FVDUAL(BODY); Make face/vertex dual of a body.
6.7 BNEW ← MKCUBE(DX,DY,DZ); Make right rectangular prism.
6.8 BNEW ← MKCYLN(RADIUS,N,DZ); Make right cylinder.
6.9 BNEW ← MKBALL(RADIUS,M,N); Make sphere approximation.
7.0 EUCLIDEAN TRANSFORMATIONS.
FRAME ← TRANSLATE(INTEGER ENTITY; REAL DELTAX,DELTAY,DELTAZ);
FRAME ← ROTATE(INTEGER ENTITY; REAL ABOUTX,ABOUTY,ABOUTZ);
FRAME ← SHRINK(INTEGER ENTITY; REAL SCALEX,SCALEY,SCALEZ);
When the ENTITY argument is non-zero, these subroutines
perform the indicated Euclidean Transformation: translation,
rotation, dilation and reflection. When the ENTITY argument is ZERO,
then a FRAME node representing the desired transformation is
returned.
FRAMES and EUCLIDEAN TRANSFORMATIONS
A frame node has two intrepretations: it may be used to
represent a frame of reference or it may be used to specify a
Euclidean transformation.
As a frame of reference the XWC, YWC, ZWC datums contain the
location of the origin of the frame in world coordinates; and the
remaining nine datums IX,IY,IZ, JX,JY,JZ, KX,KY,KZ are the components
of three unit vectors I, J, and K that determine a right handed
rectangular Cartesian coordinate system. The nine components of the
unit vectors form an orthonormal rotation matrix.
As a Euclidean transformation, the frame is applied to the
3-D world coordinates of an entity Q to make new coordinates.
---------------------------------------------------------------------
| APTRAN's inner most subroutine. |
| Expects arguments in V and Q. Clobbers 1,2,X,Y,Z. |
| |
| X ← XWC(V); |
| Y ← YWC(V); |
| Z ← ZWC(V); |
| |
| XWC(V) ← X*IX(Q) + Y*JX(Q) + Z*KX(Q) + XWC(Q); |
| YWC(V) ← X*IY(Q) + Y*JY(Q) + Z*KZ(Q) + YWC(Q); |
| ZWC(V) ← X*IZ(Q) + Y*JZ(Q) + Z*KZ(Q) + ZWC(Q); |
---------------------------------------------------------------------
HOMOGENEOUS COORDINATES
The interpretation of frame nodes can be given in the
four by four notation of homogeneous coordinates.
8.0 GEOMETRIC MEASURE ROUTINES.
9.0 BODY INTERSECTION AND CUTTING.
10.0 IMAGE FORMATION ROUTINES.
11.0 INPUT/OUTPUT ROUTINES.
12.0 AUXILLARY ROUTINES: III DISPLAY AND ARITHMETIC.